package com.cci.kangdao.dao;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.mybatis.spring.annotation.MapperScan;

import java.util.List;
import java.util.Map;


@MapperScan
public interface SceneTechnicalConfirmationTDao {


    int insertSelective(Map<String,Object> map);


    /*@Select("select a.ESN,b.SMN,a.OEMName,a.WorkHours,a.WorkMileages,a.CustomerComplaint,c.PhysicalTruthType,ISNULL(c.OtherDescription,'') OtherDescription,c.ID as SceneTechnicalConfirmationId from WorkOrder_T a\n" +
            "inner join EngineMsg b on a.ESN = b.ESN\n" +
            "left join SceneTechnicalConfirmation_T c on a.ID = c.OrderId\n" +
            "where a.ID = #{orderId} and c.Flag = 0 order by c.ID")
    List<Map<String,Object>> getSceneTechnicalConfirmationByOrderId(@Param("orderId")long orderId);*/

    //因删除现场技术确认   上面sql改为下面
    @Select("select a.ESN,b.SMN,a.OEMName,a.WorkHours,a.WorkMileages,a.CustomerComplaint,a.FaultCodes as FaultCodes,a.SymptomName as SymptomName " +
            "from WorkOrder_T a\n" +
            "inner join EngineMsg b on a.ESN = b.ESN\n" +
            "where a.ID = #{orderId}")
    List<Map<String,Object>> getSceneTechnicalConfirmationByOrderId(@Param("orderId")long orderId);
}
